package HomeWork.Chapter03;

/**
 * Enjoy programming!!!
 * Time: 2021/11/3 -  20:40
 */
public class PrimeNumber {
    public static void main(String[] args) {
        int s = 100;//求100以内的素数
        int n = 0;
        for (int i = 2; i <= s; i++) {//i即为要测的数
            for (int j = 1; j <= i; j++) {
                if (0 == i % j)
                    n++;
            }
            if (2 == n)
                System.out.println(i);
//            n = 0;
        }
    }
}
